package com.gpf.service;

import com.gpf.entity.Book;
import com.gpf.entity.Card;
import com.gpf.entity.User;

import java.util.List;


public interface CardService {

    /**
     * 获取用户的购物车
     * @param id
     * @return
     */
    public List<Card> getCard(Integer id);

    /**
     * 添加用户信息和图书信息到用户的购物车
     * @param user
     * @param book
     * @param booknum
     * @return
     */
    public boolean addCard(User user, Book book, Integer booknum);

    /**
     * 根据Book获取booknum
     * @param book
     * @return
     */
    public Integer getBookNum(Book book);
}
